home *** CD-ROM | disk | FTP | other *** search
/ Games of Daze / Infomagic - Games of Daze (Summer 1995) (Disc 1 of 2).iso / x2ftp / msdos / libs / vesatp11 / example / example3.pas < prev    next >
Encoding:
Pascal/Delphi Source File  |  1994-04-21  |  796 b   |  39 lines

  1. {$X+}
  2.  
  3. {
  4.  Example program to show the use of:
  5.   - InstallUserFnt
  6. }
  7.  
  8. PROGRAM example2;
  9. USES
  10.     VGraph,Crt;
  11.  
  12. VAR
  13.     f        : FILE;
  14.    buf    : POINTER;
  15.     size     : LONGINT;
  16.  
  17. BEGIN
  18.     Assign(f,ParamStr(1));
  19.    Reset(f,1);
  20.     size := FileSize(f);
  21.  
  22.     GetMem(buf,size);
  23.     BlockRead(f,buf^,size);
  24.     Close(f);
  25.  
  26.     InitVesa(V640x480x256);
  27.     SetRGBPal(255,255,255,255);
  28.     InstallUserFnt(buf);
  29.    SetColor(GetMaxColor);
  30.     SetTextStyle(DefaultFont,HorizDir,1);
  31.    SetTextJustify(CenterText,CenterText);
  32.     OutTextXY(GetMaxX DIV 2,100,'This is a test with a user installed font !');
  33.     OutTextXY(GetMaxX DIV 2,200,'abcdefghifklmnopqrstuvwxyz');
  34.     OutTextXY(GetMaxX DIV 2,300,'ABCDEFGHIJKLMNOPQRSTUVWXYZ');
  35.    ReadKey;
  36.    CloseVesa;
  37.     FreeMem(buf,size);
  38.     WriteLn(TextWidth('X'),'x',TextHeight('X'));
  39. END.